
import 'dart:async';
import 'dart:convert';

import 'package:flutter/services.dart';

class FgetFile {
  static const MethodChannel _channel = const MethodChannel('fget_file');

  static Future<String> get platformVersion async {
    final String version = await _channel.invokeMethod('getPlatformVersion');
    return version;
  }

  static Future<dynamic>  files({List<String> type,String path}) async {
    Map<String, Object> map = {"type": type ?? ["png","jpg","bmp"],"path": path};
    String temp = await _channel.invokeMethod('getFiles',map) ?? null;
    return  jsonDecode(temp);
  }
}
